Method and apparatus for downloading and displaying pictures

ABSTRACT

A computer-implemented method for downloading and displaying pictures associated with instant messages is performed at a computing device. The computing device displays a list of instant messages on the screen, at least one of the instant messages having an associated picture and including address information of the picture. While the picture is being downloaded, the computing device detects a user instruction to slide the list of instant messages on the screen. In response to the user instruction, the computing device pauses the download of the picture and determines, among the list of instant messages, a second instant message having an associated second picture and including address information of the second picture based on the user instruction. The computing device then downloads the second picture associated with the second instant message according to the address information without receiving a download instruction from the user of the computing device.

RELATED APPLICATIONS

This application is a continuation of U.S. patent application Ser. No.15/188,881, entitled “METHOD AND APPARATUS FOR DOWNLOADING ANDDISPLAYING PICTURES” filed on Jun. 21, 2016, which is a continuationapplication of PCT Patent Application No. PCT/CN2015/071780, entitled“METHOD AND APPARATUS FOR DOWNLOADING AND DISPLAYING PICTURES” filed onJan. 28, 2015, which claims priority to Chinese Patent Application No.201410176930.2, entitled “PICTURE DISPLAYING METHOD AND APPARATUS” filedon Apr. 29, 2014, the entirety of which are incorporated by reference intheir entirety.

TECHNICAL FIELD

The disclosed implementations relate generally to the field of instantmessaging, and in particular, to method and apparatus for downloadingand displaying pictures associated with an instant messagingapplication.

BACKGROUND

Along with the development of instant messaging technology, a user maytransmit various formats of instant messages, such as texts, audios,pictures and the like, through an instant messaging application. Bytaking both parties of a session as a first user and a second user foran example, a terminal of the first user may display instant messagestransmitted between the first user and the second user in an instantmessaging session window for communicating with the second user.

A message having an associated picture means that a picture is displayedin form of a thumbnail. When the terminal of the first user receives amessage having an associated picture sent by the second user, firstly athumbnail is displayed in an instant messaging session window. When theterminal detects an operation that the first user clicks on thethumbnail, a picture associated with the message is downloaded. When thedownloading of the picture is finished, the picture is displayed.

When the terminal displays the thumbnail, the content of the picture isfuzzy, and the previewing effect is poor. Furthermore, the terminal maystart downloading the picture when it detects the operation that thefirst user clicks on the thumbnail. Therefore, the operation is tedious,and the efficiency for processing messages is reduced.

SUMMARY

The above deficiencies and other problems (e.g., bad user experience)associated with the conventional approach of downloading and displayingpictures are reduced or eliminated by the present application disclosedbelow. In some embodiments, the present application is implemented in acomputing device (e.g., a PC, a tablet or a smartphone) that has one ormore processors, memory and one or more modules, programs or sets ofinstructions stored in the memory for performing multiple functions.Instructions for performing these functions may be included in acomputer program product configured for execution by one or moreprocessors.

In accordance with some embodiments of the present application, acomputer-implemented method for downloading and displaying picturesassociated with instant messages on a screen of a computing device isperformed at the computing device having one or more processors andmemory for storing program modules to be executed by the processors. Themethod includes: receiving an instant message, the instant messagehaving an associated picture and including address information of thepicture; determining whether the computing device is in a first networkenvironment or not; when the computing device is in the first networkenvironment: displaying a thumbnail of the picture on the screen and avisual cue indicating that the picture is being downloaded; downloadingthe picture associated with the instant message according to the addressinformation without receiving a download instruction from a user of thecomputing device; and replacing the thumbnail with the picture after thepicture is downloaded. In accordance with some embodiments of thepresent application, a computing device includes one or more processors;memory; and one or program modules stored in the memory for performingthe method mentioned above. In accordance with some embodiments of thepresent application, a non-transitory computer readable storage mediumstores one or more program modules configured for execution by acomputing device that includes one or more processors and memory forperforming the method mentioned above.

BRIEF DESCRIPTION OF DRAWINGS

The aforementioned implementation of the invention as well as additionalimplementations will be more clearly understood as a result of thefollowing detailed description of the various aspects of the inventionwhen taken in conjunction with the drawings. Like reference numeralsrefer to corresponding parts throughout the several views of thedrawings.

To illustrate the technical solutions in the embodiments of the presentapplication more clearly, accompanying drawings required for describingthe embodiments are briefly introduced in the following. Obviously, theaccompanying drawings in the following description are merely someembodiments of the present application, and persons of ordinary skillsin the art may further obtain other drawings according to theseaccompanying drawings without creative efforts.

FIG. 1 is a flow chart of a picture displaying method according to someembodiments of the present application;

FIG. 2A is a flow chart of a picture displaying method according to someembodiments of the present application;

FIG. 2B is a schematic diagram of display of an instant messagingsession window according to some embodiments of the present application;

FIG. 2C is a schematic diagram of display of an instant messagingsession window according to some embodiments of the present application;

FIG. 2D is a schematic diagram of display of an instant messagingsession window according to some embodiments of the present application;

FIG. 2E is a schematic diagram of display of an instant messagingsession window according to some embodiments of the present application;

FIG. 3 is a flow chart of a picture displaying method according to someembodiments of the present application;

FIG. 4 is a structural block diagram of an apparatus for downloading anddisplaying pictures according to some embodiments of the presentapplication; and

FIG. 5 is a structural block diagram of a computing device according tothe embodiments of the present application.

DETAILED DESCRIPTION

The technical solutions in the embodiments of the present applicationare clearly and completely described in the following with reference tothe accompanying drawings. Evidently, the embodiments to be describedare merely part of rather than all of the embodiments of the presentapplication. All other embodiments obtained by persons of ordinaryskills in the art based on the embodiments of the present applicationwithout creative efforts shall fall within the protection scope of thepresent application.

FIG. 1 is a flow chart of a picture displaying method according to someembodiments of the present application. The execution main body in theembodiments of the present application is a terminal. Referring to FIG.1, the method comprises the following steps:

Step 101: Obtain a message having an associated picture and includingaddress information of the picture;

Step 102: Determine that the terminal is currently in a first networkenvironment;

Step 103: Download the picture associated with the message according tothe address information without requiring a download instruction;

Step 104: Display the picture in an instant messaging session windowwhen the downloading of the picture is finished.

According to the method provided in the embodiments of the presentapplication, the terminal may directly download a picture associatedwith a message without requiring a download instruction when theterminal obtains the message in a first network environment. Therefore,the picture may be displayed clearly, the previewing effect is improved,the operation of user is simplified, and the efficiency for processingmessages is improved.

In some embodiments, after obtaining the message, the method may furthercomprise: displaying a thumbnail of the message in the instant messagingsession window; replacing the thumbnail by the picture in the instantmessaging session window when the downloading of the picture isfinished.

In some embodiments, the step of downloading the picture associated withthe message according to the address information without requiring adownload instruction comprises: downloading pictures in a chronologicalorder of message receiving time according to address information of atleast one message having an associated picture without requiring adownload instruction when obtaining the at least one message.

In some embodiments, the method may further comprise: cancelling thedownloading of the picture when a sliding operation of the user in thepicture downloading process is detected; obtaining an old instantmessage corresponding to the sliding operation according to a pagesliding distance of the sliding operation and an old message log;downloading a picture associated with an old message according toaddress information when the old instant message includes the oldmessage having an associated picture.

In some embodiments, the method may further comprise: downloadingpictures in a reverse chronological order of message receiving timeaccording to address information of at least one message having anassociated picture without requiring a download instruction, when theinstant messaging session window runs in background and at least onemessage having an associated picture is received.

In some embodiments, the step of downloading pictures in a reversechronological order of message receiving time according to addressinformation of at least one message having an associated picture withoutrequiring a download instruction comprises: waiting for a first presetduration and obtaining data usage generated during the first presetduration, when the downloading of a first picture is finished;continuing to wait for the first preset duration, and obtaining the datausage generated during the first preset duration, when the data usage isgreater than a preset threshold; and downloading a second picture nextto the first picture, when the data usage is not greater than the presetthreshold.

In some embodiments, the method may further comprise: for each picture,counting a duration used for downloading the picture in the picturedownloading process; pausing the downloading of the picture, when theduration is longer than a second preset duration; continuing to downloadthe picture, when receiving the instant message sent by another useragain.

In some embodiments, the step of downloading the picture associated withthe message according to the address information without requiring adownload instruction comprises: downloading pictures in an orderaccording to the respective pictures' sizes such that a smaller pictureis larger picture without requiring a download instruction whenobtaining the at least one message. For example, when the terminalreceives multiple messages within a short time window, the terminal maydownload the picture having the smallest size first and then downloadthe next picture of a greater size. By doing so, the terminal can havemore pictures downloaded for a given amount of time. In this case, thepictures may be downloaded in neither a chronological order nor areverse chronological order as described above.

In some embodiments, the method may further comprise: pausing thedownloading of the picture when a preset event occurring in the picturedownloading process is detected.

In some embodiments, the preset events comprises an event of openinganother instant messaging session window, an event of opening a videocall, an event of opening a voice call and an event of downloading otherfiles.

In some embodiments, the method may further comprise: obtaining at leastone old message having an associated picture, and downloading picturesin a chronological order of message receiving time according to addressinformation of the at least one old message having an associated picturewithout requiring a download instruction, when the instant messagingsession window is switched from background running to foregrounddisplay.

In some embodiments, the step of determining that the terminal iscurrently in a first network environment comprises: judging whethercurrent data connection is a Wi-Fi connection or not; determining thatthe terminal is in the first network environment when the current dataconnection is a Wi-Fi connection.

All of the foregoing optional technical solutions may be combined in anyforms to form the optional embodiments of the present application, anddetails are not described herein one by one again.

FIG. 2A is a flow chart of a picture displaying method according to someembodiments of the present application. The embodiments of the presentapplication are applied to the scene that an instant messaging sessionwindow for communicating with another user is displayed in foreground.The execution main body in the embodiments of the present application isa terminal. Referring to FIG. 2A, the method comprises following steps.

Step 201: The terminal receives at least one message having anassociated picture sent by another user.

Wherein an instant messaging application is used for transmittinginstant messages between at least two users, the terminal installs theinstant messaging application, and the instant messaging applicationprovides the instant session window between a terminal user and any oneuser. The other user is any one user except for the terminal user. Whenthe instant messaging session window for communicating with the otheruser is displayed in foreground, the terminal may transmit/receive theinstant messages to/from the other user. Specifically the terminalobtains an instant message input by the terminal user in the instantmessaging session window, sends the instant message to the other user,and displays the instant message in the instant messaging sessionwindow. Meanwhile, the terminal receives an instant message sent by theother user and displays the instant message in the instant messagingsession window. Furthermore, the instant message may be an instant textmessage, a message having an associated picture, an instant audiomessage and the like, which is not limited in the embodiments of thepresent application.

Step 202: The terminal displays at least one thumbnail of the at leastone message in an instant messaging session window for communicatingwith the other user.

In the embodiments of the present application, the instant message meansthat a picture is displayed in form of a thumbnail. When the terminalreceives a message having an associated picture sent by the other user,it displays the thumbnail of the message in the instant messagingsession window.

FIG. 2B is a schematic diagram of an instant messaging session windowbetween a terminal user and another user. Referring to FIG. 2B, in aninstant messaging session between a user A and a user B, the terminaldisplays thumbnails, including a thumbnail 1 and a thumbnail 2, of twomessages, each having an associated picture, in the instant messagingsession window when the terminal receives two messages, each having anassociated picture, including a message having an associated picture 1and a message having an associated picture 2, sent by the user B.

Step 203: The terminal judges whether the current data connection is aWi-Fi (wireless-fidelity) connection or not. If yes, the terminalexecutes a step of 204; otherwise, the terminal does not.

When the current data connection is a mobile network connection, thepicture downloading speed is relatively slow, and the data usage may becharged at a high rate. The data usage used for downloading a picture isgreater than the data usage used for receiving a text-based instantmessage. As such, the cost of data usage will increase if a pictureassociated with a message is downloaded when the message is received bythe terminal. When the current data connection is a Wi-Fi connection(203—Yes), the picture downloading speed is relatively high, and thedata usage will not be charged. Therefore, in the embodiments of thepresent application, the terminal firstly judges whether the currentdata connection is a Wi-Fi connection or not. If yes (203—Yes), theterminal determines that it is in the first network environment, anddownloads the picture associated with the message. If not (203—No), theterminal determines that it is not in the first network environment, anddoes not download the picture associated with the message.

It should be noted that the embodiments of the present application isillustrated only by taking that the step 203 is carried out after thestep 202 for an example. In some embodiments, the step 203 may becarried out before the step 202, which is not limited in the embodimentsof the present application.

Step 204: The terminal downloads pictures in a chronological order ofmessage receiving time according to address information of the at leastone message without requiring a download instruction. Wherein themessage comprises the address information of the pictures, and theterminal may download the pictures according to the address information.

In the embodiments of the present application, in order to ensure theinformation coherence of the message, the terminal may sequentiallydownload at least one picture associated with the messages, each havingan associated picture, in a chronological order of message receivingtime according to the address information of the at least one messagewithout requiring a download instruction when the terminal receives themessages sent by the other user. Referring FIG. 2B, the terminal firstlydownloads a picture 1 corresponding to the thumbnail 1, and secondlydownloads a picture 2 corresponding to the thumbnail 2 after thedownloading of the picture 1 is finished in order to firstly display thepicture 1 in the instant messaging session window, which is as shown inFIG. 2C. As shown in FIG. 2B, a visual cue such as the curved arrow sign210 or a progress bar (not shown) on the thumbnail 1 indicates that thedownloading of the picture 1 has started while there is no such visualcue on the thumbnail 2, indicating that the downloading of the picture 2has not started yet.

In some embodiments, the terminal pauses the download of the picturewhen it is no longer in the first network environment while the picturehas not been downloaded yet. For example, the wireless router providingthe Wi-Fi connection may be shut down or stopped for other reasons. Inthis case, the visual cue indicating that the picture is beingdownloaded may be replaced with a different visual cue indicating thatthe download of the picture is paused. If there is another wirelessconnection available to the terminal, e.g., via a cellular network, theterminal can resume the download of the picture after receiving adownload instruction from the user.

In some embodiments, when the terminal receives a message having anassociated picture sent by the other user, it adds address informationincluded in the message to a download queue. The download queuecomprises at least one picture's address information, and each addressinformation corresponds to a picture to be downloaded. The terminalsequentially downloads pictures according to the at least one picture'saddress information in the download queue without requiring a downloadinstruction. The terminal deletes the address information of thedownloaded picture from the download queue after the downloading of apicture corresponding to any one picture's address information. Whereinthe download queue is a first-in-first-out queue, and the terminal maydownload pictures in a chronological order of message receiving timewhen it downloads the pictures according to the download queue.Furthermore, the terminal may further preset a maximum number of addressinformation entries in the download queue. When the number of addressinformation entries in the download queue is greater than the maximumnumber, the terminal selects the maximum number of the addressinformation entries in a chronological order of message receiving time,and deletes the remaining address information entries from the downloadqueue. In some embodiments, the maximum number is 100.

Furthermore, while more and more instant messages are transmittedbetween the terminal user and the other user, the previously-transmittedinstant messages slide upwards and even slide out of a display range ofthe instant messaging session window. At this time, the terminal doesnot display the instant messages sliding out of the display range. As aresult, even though the terminal downloads pictures associated with theinstant messages, the pictures are not displayed in the instantmessaging session window. Therefore, in order to ensure that picturesassociated with the messages in the display range are firstlydownloaded, the step 204 may further comprise: the terminal judgeswhether the display range comprises a message having an associatedpicture in real time. When the display range comprises at least onemessage having an associated picture, the terminal downloads at leastone picture associated with the messages in a chronological order ofmessage receiving time. If the terminal detects that a message having anassociated picture slides out of the display range in a process ofdownloading the picture, it may pause or cancel the downloading of apicture associated with the message sliding out of the display range,re-determines a message having an associated picture in the displayrange, and continues to download pictures associated with the messagesin the display range.

Referring to FIG. 2C, the terminal starts downloading the picture 2after finishing the downloading of the picture 1. Note that there is acurved arrow sign 212 on the thumbnail 2 indicating that the downloadingof the picture 2 has started. During a process of downloading thepicture 2, the terminal user and the other user may continuouslytransmit instant messages. As shown in FIG. 2D, when the message havingan associated picture 2 slides out of the display range of the instantmessaging session window, the terminal pauses or cancels the downloadingof the picture 2. At this time, the terminal determines that the displayrange comprises a message having an associated picture 3 and then startsdownloading a picture 3 associated with the message 3 (see, e.g., thecurved arrow sign 214).

It should be noted that the embodiments of the present application areillustrated by taking an operation of downloading the at least onepicture in a chronological order of message receiving time for anexample. In some embodiments, the terminal may further download the atleast one picture in a reverse chronological order of message receivingtime, that is the terminal determines address information received atthe latest time in the download queue and downloads the addressinformation received at the latest time when the downloading of apicture is finished, which is not limited in the embodiments of thepresent application.

It should be further noted that the display range of the instantmessaging session window is limited and an original picture associatedwith the message cannot be completely displayed in the instant messagingsession window when it is oversize. Therefore, in order that theterminal user may conveniently browse the picture, the terminal maypreset a maximum picture size and a minimum picture size. Whendownloading the picture associated with the message, the terminalfirstly judges whether the size of the original picture is smaller thanthe maximum picture size, and secondly judges whether the size of theoriginal picture is larger than the minimum picture size. When the sizeof the original picture is larger than the minimum size and smaller thanthe maximum picture size, the terminal downloads the original picture soas to display the original picture later. When the size of the originalpicture is not smaller than the maximum picture size, the terminaldownloads the original picture, and performs proportional compression onthe original picture so as to display the compressed picture later. Whenthe size of the original picture is not larger than the minimum picturesize, the terminal does not start the downloading of the originalpicture. In some embodiments, the maximum picture size is larger thanthe size of a display screen of the terminal, and the difference betweenthe maximum picture size and the size of the display screen is within apreset range.

Step 205: For each downloaded picture, the terminal replaces thethumbnail by the picture in the instant messaging session window whenthe downloading of the picture is finished.

In the embodiments of the present application, when the terminalfinishes the downloading of a picture, it determines a display area of athumbnail corresponding to the downloaded picture in the messagingsession window, displays the picture in the display area to replace thethumbnail. The size of the picture should be larger than the size of thethumbnail. Assuming that an instant message sent by the other user isdisplayed on the left side of the instant messaging session window, theterminal may display the picture by taking the top left corner of adisplay area of the thumbnail as the top left corner of the display areaof the picture. Referring to FIG. 2B and FIG. 2C, the terminal displaysthe picture 1 in the display area of the thumbnail 1 when thedownloading of the picture 1 is finished. Note that the first message inthe instant messaging session window of FIG. 2B has been pushed out ofthe window to leave more room for displaying the picture 1.

Step 206: The terminal pauses/cancels the downloading when the slidingoperation of the terminal user in a downloading process is detected.

When the terminal user needs to check an old instant message, it maytrigger a downward sliding operation. When the terminal detects thedownward sliding operation, it slides the messages in the instantmessaging session window downwards, and redisplays an instant messageaccording to a sliding distance. When the terminal user needs to checkan instant message transmitted after the currently displayed old instantmessage, it may trigger an upward sliding operation. When the terminaldetects the upward sliding operation, it slides the messages in theinstant messaging session window upwards, and redisplays an instantmessage according to a sliding distance. When the terminal detects theupward sliding operation or the downward sliding operation of theterminal user in a process of downloading at least one picture, itfirstly pauses/cancels the downloading of the at least one picture inorder to ensure that the picture checked by the terminal user is firstlydownloaded.

Step 207: The terminal obtains an old instant message corresponding to asliding operation according to a sliding distance of the slidingoperation and an old message log for the other user.

In the embodiments of the present application, the terminal generates amessage log for the other user according to the transmitted instantmessages in a process of transmitting/receiving an instant messageto/from the other user. When the terminal detects the sliding operation,it obtains the sliding distance of the sliding operation, and determinesan old instant message, which is the old instant message correspondingto the sliding operation, in a display range according to the slidingdistance and the old message log for the other user. The old message logcomprises transmission time of each old instant message. The content ofeach old instant message is different, and the size of a display areafor displaying each old instant message is also different. Therefore, inorder to determine the old instant message in the display range, bytaking an upward sliding operation for an example, the terminal obtainsthe old instant message from the old message log in an order oftransmission time from latest to earliest when the upward slidingoperation is detected, and along with the upward sliding, the terminalsequentially displays the obtained old instant message in the displayarea. In two adjacently transmitted old instant messages, an old instantmessage transmitted at an earlier time is displayed above an old instantmessage transmitted at later time. When the upward sliding distance isup to the sliding distance corresponding to the sliding operation, thewindow stops sliding, and the terminal obtains the old instant message,which is the old instant message corresponding to the sliding operation,displayed in the display range.

Step 208: The terminal downloads a picture associated with an oldmessage according to address information of the picture when the oldinstant messages includes the old message.

Referring to FIG. 2D, when the terminal detects a downward slidingoperation 216 (e.g., the downward arrow sign in the figure) during aprocess of downloading a picture 3, it pauses or cancels the downloadingof the picture 3. The messages in the instant messaging session windowslides downwards along with the downward sliding operation 216 at thistime. The terminal obtains an old instant message corresponding to thesliding operation according to a sliding distance and an old message logfor the user B. As shown in FIG. 2E (an instant message displayed in theFIG. 2E is transmitted before the instant message displayed in the FIG.2B), the old instant message comprises a message having an associatedpicture 4, so that the terminal downloads a picture 4 associated withthe message 4 (see, e.g., the curved arrow sign 218). It should be notedthat the embodiments of the present application merely concerns amessage having an associated picture sent by the other user and receivedby the terminal when the instant messaging session window between theterminal user and the other user is displayed in foreground. For amessage having an associated picture sent to the other user by theterminal, the terminal user has known specific picture contents of themessages, so that the terminal may display thumbnails or picturescorresponding to the messages in the instant messaging session window,which is not limited in the embodiments of the present application.However, for a message having an associated picture received by theterminal and sent by other user, except for the other user, the terminalmay download pictures associated with the messages, and also downloadthe pictures associated with the messages after the instant messagingsession window for communicating with the other user is displayed inforeground, or may download the pictures associated with the messagesafter the downloading of the pictures associated with the messages sentby the other user is finished, which also are not limited in theembodiments of the present application.

According to the method provided in the embodiments of the presentapplication, when the instant messaging session window for communicatingwith the other user is displayed in foreground, and when the terminalobtains the message sent by the other user in the first networkenvironment, the terminal displays the thumbnail of the message, maydirectly download the picture associated with the message on the premiseof not receiving the download instruction, and displays the pictureafter the downloading of the picture is finished. Therefore, the picturemay be displayed clearly, the previewing effect is improved, theoperation of user is simplified, and the efficiency for processingmessages is improved. Furthermore, when the terminal detects the slidingoperation, the terminal obtains the old message having an associatedpicture corresponding to the sliding operation, and downloads thepicture associated with the old message having an associated picture, sothat the user may browse the previously received picture merely bytriggering the sliding operation. Therefore, the operation is simple andconvenient.

FIG. 3 is a flow chart of a picture displaying method according to someembodiments of the present application. The embodiments of the presentapplication are applied to the scene that an instant messaging sessionwindow for communicating with another user runs in background. Theexecution main body in the embodiments of the present application is aterminal. Referring to FIG. 3, the method comprises:

Step 301: When the terminal receives at least one message having anassociated picture sent by the other user, it judges whether currentdata connection is a Wi-Fi connection or not. If yes, the terminalperforms step 302; if no, the terminal does not.

In a running process of an instant messaging application, the terminalmay receive an instant message sent by any one user. By taking the otheruser for an example, when the instant messaging session window forcommunicating with the other user runs in background, the terminal stillmay receive an instant message sent by the other user. When the terminalreceives the instant message sent by the other user, it firstly judgeswhether current data connection is a Wi-Fi connection or not. If thecurrent data connection is a Wi-Fi connection, the terminal determinesit is in a first network environment and downloads at least one pictureassociated with at least one message having an associated picture, sothat the terminal does not need to display a thumbnail of the at leastone message, but directly displays the at least one picture when theterminal opens the instant messaging session window for communicatingwith the other user later. If the current data connection is not theWi-Fi connection, the terminal determines it is not in the first networkenvironment and does not download the at least one picture, and when theterminal opens the instant messaging session window later, it displaysthe thumbnail of the at least one message. It should be noted that theembodiments of the invention are illustrated with an example in whichthe terminal is determined currently being in the first networkenvironment when the current data connection is a Wi-Fi connection.However, in practical application, besides judging that the current dataconnection of the terminal is a Wi-Fi connection, the terminal mayfurther judge whether a specific application runs or not, wherein thespecific application is an application except for the instant messagingapplication, and the data usage of the specific application used forrunning is over a preset threshold. When the current data connection ofthe terminal is a Wi-Fi connection, and the terminal does not run thespecific application, the terminal determines it is in the first networkenvironment.

Step 302: The terminal downloads at least one picture associated with atleast one message in a reverse chronological order of message receivingtime according to address information of the at least one messagewithout requiring a download instruction.

In the embodiments of the present application, the terminal receives atleast one instant message sent by the other user. Next, if the terminalopens the instant messaging session window, it firstly displays aninstant message received at the latest time in the at least one instantmessage. When instant messages sent by the other user are too many, theterminal displays an instant message received at the latest time at thebottom of the instant messaging session window, and instant messagesreceived at the earlier time may be displayed out of a display range ofthe instant messaging session window. Therefore, in order to ensure thata picture associated with a message firstly displayed by the terminal isdownloaded, the terminal downloads the picture in a reversechronological order of message receiving time according to addressinformation of the at least one message without requiring a downloadinstruction.

For example, when the terminal sequentially receives a message having anassociated picture 1 and a message having an associated picture 2 sentby the other user, the terminal downloads the picture 2 associated withthe message 2. If the terminal receives a message having an associatedpicture 3 during a process of downloading the picture 2, it downloadsthe picture 3 associated with the message 3 after the downloading of thepicture 2 is finished.

In some embodiments, when the terminal receives a message having anassociated picture sent by the other user, it adds address informationincluded in the message to a download queue. The download queuecomprises at least one picture's address information, and each addressinformation corresponds to a picture to be downloaded. The terminalsequentially downloads pictures according to the at least one picture'saddress information in the download queue without requiring a downloadinstruction. The terminal deletes the address information of thedownloaded picture from the download queue after the downloading of apicture corresponding to any one picture's address information. Whereinthe download queue is a last-in-first-out queue, and the terminal maydownload the pictures in a reverse chronological order of messagereceiving time when it downloads the pictures according to the downloadqueue.

Furthermore, the terminal may further preset a maximum number of addressinformation entries in the download queue. When the number of addressinformation entries in the download queue is greater than the maximumnumber, the terminal selects the address information of the maximumnumber in a reverse chronological order of message receiving time, anddeletes the remaining address information entries from the downloadqueue. In some embodiments, the maximum number is 100.

Step 303: For a first picture in the at least one picture, the terminalcounts time duration for downloading the first picture in a process ofdownloading the first picture. Specifically, the terminal starts timingwhen it starts downloading the first picture so as to obtain the countedduration during the process of downloading the first picture.

Step 304: The terminal judges whether the duration is longer than asecond preset duration. If yes, the terminal pauses downloading of thefirst picture, and continues to download the first picture when itreceives an instant message sent by the other user again. If no, theterminal performs a step 305.

In the embodiments of the present application, the terminal judgeswhether the counted duration is longer than the preset duration in realtime. When the counted duration is longer than the preset duration, thedownloading time of the first picture is too long, so that thedownloading of the first picture is paused in order to avoid consumingtoo much electric power. When the terminal receives a new instantmessage sent by the other user, the terminal continues to download thefirst picture.

Wherein the second preset duration may be set by technicians duringdevelopment or by the terminal user in use, which is not limited in theembodiments of the present application. In some embodiments, the secondpreset duration is 20 minutes.

Step 305: The terminal continues to download the first picture, and whenthe downloading of the first picture is finished, the terminal waits fora first preset duration to obtain data usage generated during the firstpreset duration.

Step 306: The terminal judges whether the data usage is greater than apreset threshold or not. If yes, the terminal performs a step 307; ifno, the terminal performs a step 308.

In the embodiments of the present application, when the downloading ofthe first picture is finished, the terminal does not directly download asecond picture, but waits for the first preset duration, and calculatesthe data usage generated during the first preset duration. When the datausage is not greater than the preset threshold, other services processedby the terminal do not occupy too much network resource, so that theterminal may continue to download the second picture. When the datausage is greater than the preset threshold, the other services processedby the terminal occupy too much network resource, so that, in order toprevent resource competition from causing influence on the processing ofthe other services and ensure the service processing efficiency of theterminal, the terminal continues to wait for the first preset duration,and continues to calculate the data usage generated during the firstpreset duration, and the terminal starts downloading the second picturetill the calculated data usage is not greater than the preset threshold.Wherein the first preset duration may be set by technicians duringdevelopment or by the terminal user in use, which is not limited in theembodiments of the present application. In some embodiments, the firstpreset duration is 1 second.

Step 307: The terminal continues to wait for the first preset duration,and obtains the data usage generated during the first preset duration;the terminal starts downloading a second picture until the data usage isnot greater than the preset threshold, wherein the second picture is anext picture after the first picture; the terminal performs a step 309.

Step 308: The terminal starts downloading a second picture, and thenperforms a step 309.

Step 309: The terminal pauses downloading of the second picture when apreset event occurs when a process of downloading the second picture.

In the embodiments of the present application, when the instantmessaging session window for communicating with the other user is notdisplayed in foreground, and the terminal receives at least one messagehaving an associated picture sent by the other user, the terminal doesnot need to immediately download at least one picture associated withthe at least one message. In order to avoid the resource competition andensure the service processing efficiency of the terminal, the terminalmay preset multiple preset events. When the terminal detects any onepreset event occurring in a process of downloading the picture, theterminal pauses downloading of the at least one picture and turns toprocess the preset event. Wherein the preset event may be an event ofopening another instant messaging session window, an event of starting avideo call, an event of starting a voice call, an event of downloadingother files and the like, which is not limited in the embodiments of thepresent application.

Step 310: The terminal resumes downloading the second picture when thefinishing of the preset event is detected.

In the embodiments of the present application, the occurring manners andending manners of different preset events are also different. Based onthe foregoing listed four preset events, the step 309 and the step 310may comprise any one of following steps (1) to (4):

(1) When the terminal detects an instant messaging session windowbetween the terminal user and a third user, except for the other user,is opened in a process of downloading the second picture, the terminalpauses the downloading of the second picture. When the terminal closesother instant messaging session window, or when the terminal finishesthe downloading of a picture associated with a message in the otherinstant messaging session window, the terminal determines that thepreset event is ended and resumes downloading the second picture.

(2) When the terminal detects the video call is opened during theprocess of downloading the second picture, it pauses downloading of thesecond picture. When the terminal closes the video call, it determinesthat the preset event is ended, and resumes downloading the secondpicture.

(3) When the terminal detects the voice call is opened during theprocess of downloading the second picture, it pauses downloading of thesecond picture. When the terminal closes the voice call, it determinesthat the preset event is ended, and resumes downloading the secondpicture.

(4) When the terminal detects downloading other files during the processof downloading the second picture is started, it pauses downloading ofthe second picture. When the downloading of the other files is finished,the terminal determines that the preset event is ended, and resumesdownloading the second picture. Wherein the other files mean files,except for the at least one picture, and may be pictures associated withthe message sent by other user, except for the other user, files sent bythe other user or the other user through the instant messagingapplication, files downloaded by the terminal in a browser, and thelike.

It should be noted that the terminal may open the instant messagingsession window for the other user, that is, the instant messagingsession window is switched from the background running to the foregrounddisplay. Therefore, after the step 309, the method may furthercomprises: when the terminal detects an operation of opening the instantmessaging session window, it obtains at least one old instant messagetransmitted/received to/from the other user according to the old messagelog for the other user, and displays at least one history instantmessaging information transmitted at later time in the instant messagingsession window. Wherein the at least one old instant message transmittedat the later time is an at least one old instant message displayed inthe display range when the terminal displays an old instant messagetransmitted at the latest time at the bottom of the instant messagingsession window, and displays an old instant message transmitted at earlytime above an old instant message transmitted at a later time.

The instant message may comprise a first message having an associatedpicture that has been completely downloaded, and also may comprise asecond message having an associated picture that has not been completelydownloaded. Therefore, when the at least one instant message comprisesthe first message having an associated picture that has been completelydownloaded, the terminal displays the completely downloaded picture in adisplay area of the first message having an associated picture. When theat least one instant message further comprises at least one secondmessage having an associated picture that has not been completelydownloaded, the terminal displays a thumbnail of the at least one secondmessage having an associated picture in the at least one display area ofthe at least one second message having an associated picture, andaccording to address information of the at least one second messagehaving an associated picture, the terminal downloads at least onepicture associated with the at least second picture message in a reversechronological order of message receiving time.

It should be noted that the instant messaging session window isdisplayed in foreground in the subsequent process, the terminal mayprocess the received message having an associated picture sent by theother user according to the processing manner provided by theembodiments shown in FIG. 2A, and the details are not described hereinagain.

According to the method provided in the embodiments of the presentapplication, when the instant messaging session window for communicatingwith the other user runs in background, and when the terminal obtainsthe message sent by the other user in the first network environment, theterminal directly downloads the picture associated with the message onthe premise of not receiving the download. Therefore, when the terminalopens the instant messaging session window, the picture may be displayedclearly, the previewing effect is improved, the operation of user issimplified, and the efficiency for processing messages is improved.Furthermore, after the terminal downloads a picture, it waits for thefirst preset duration and calculates the data usage generated during thefirst preset duration. When the data usage is smaller than the presetthreshold, the terminal downloads the next picture. The terminal alsopauses the downloading when the preset event occurring in thedownloading process is detected. Therefore, the resource competition isavoided, and the efficiency for processing services is improved. Inaddition, when the duration for downloading a picture is longer than thesecond preset duration, the terminal pauses the downloading, so that theelectric power consumed by the terminal is saved.

FIG. 4 is a structural block diagram of an apparatus for downloading anddisplaying pictures according to some embodiments of the presentapplication. Referring to FIG. 4, the apparatus comprises: a networkenvironment determining module 401, used for determining that theterminal is in a first network environment; a message having anassociated picture obtaining module 402, connected with the networkenvironment determining module 401 and used for obtaining a messagehaving an associated picture and including address information of thepicture; a downloading module 403, connected with the message obtainingmodule 402 and used for downloading a picture associated with themessage according to the address information without requiring adownload instruction; a display module 404, connected with thedownloading module 403 and used for displaying the picture in an instantmessaging session window when the downloading of the picture isfinished.

The apparatus provided in the embodiments of the present applicationdirectly downloads a picture associated with a message without requiringa download instruction when obtaining the message in a first networkenvironment. Therefore, the picture may be displayed clearly, thepreviewing effect is improved, the operation of user is simplified, andthe efficiency for processing messages is improved.

In some embodiments, the apparatus may further comprise: a firstlydisplay module, used for displaying a thumbnail of the message in theinstant messaging session window; a second display module, used forreplacing the thumbnail by the picture in the instant messaging sessionwindow when the downloading of the picture is finished;

In some embodiments, when the downloading module 403 is used fordownloading pictures according to an order of receiving time fromearliest to latest according to address information of at least onemessage having an associated picture without requiring a downloadinstruction when receiving the at least one message.

In some embodiments, the apparatus may further comprise: a slidingoperation detecting module, used for cancelling the downloading when asliding operation of a user occurring in a downloading process isdetected; an old message obtaining module, used for obtaining an oldinstant message corresponding to the sliding operation according to asliding distance of the sliding operation and an old message log; an oldmessage downloading module, used for downloading a picture associatedwith an old message according to address information when the oldinstant message includes the old message having an associated picture.

In some embodiments, the apparatus may further comprise: a backgrounddownloading module, used for, when the instant messaging session windowruns in background and at least one message having an associated pictureis received, downloading pictures according to an order of receivingtime from latest to earliest according to address information of atleast one message having an associated picture without requiring adownload instruction.

In some embodiments, the background downloading module comprises: atraffic obtaining unit, used for waiting for a first preset duration andobtaining data usage generated during the first preset duration when thedownloading of a first picture is finished; a downloading waiting unit,used for, when the data usage is greater than a threshold, continuing towait for the first preset duration and obtaining the data usagegenerated during the first preset duration, and when the data usage isnot more than the threshold, downloading a second picture next to thefirst picture.

In some embodiments, the apparatus may further comprise: a downloadingduration counting module, used for, to each picture, counting durationfor downloading the picture in a process of downloading the picture; afirst downloading pausing module, used for pausing the downloading ofthe picture when the duration is longer than a second preset duration;and a downloading continuing module, used for continuing to download thepicture when the instant message sent by the other user is receivedagain.

In some embodiments, the apparatus may further comprise: a seconddownloading pausing module, used for pausing the downloading when apresent event occurring in the downloading process is detected.

In some embodiments, the preset events comprises an event of openinganother instant messaging session window, an event of opening a videocall, an event of opening a voice call and an event of downloading otherfiles.

In some embodiments, the apparatus may further comprise: a switchingmodule, used for, when the instant messaging session window is switchedfrom background running to foreground display, obtaining at least oneold message having an associated picture, and downloading picturesaccording to an order of receiving time from latest to earliestaccording to address information of the at least one old message havingan associated picture without requiring a download instruction.

In some embodiments, the network environment determining module 401comprises: a connection judging unit, used for judging whether thecurrent data connection is a Wi-Fi connection; a network environmentdetermining unit, used for determining that the terminal is in the firstnetwork environment currently when the current data connection is aWi-Fi connection.

FIG. 5 shows a structural block diagram of a computing device 500related to in the embodiment of the present application. The computingdevice may be applied to implement the method for downloading anddisplaying pictures according to the foregoing embodiments. To bespecific, the computing device 500 may comprise such parts as acommunication unit 110, a memory 120 comprising one or more than onenon-transitory computer readable storage medium, an input unit 130, adisplay unit 140, a sensor 150, an audio circuit 160, a Wi-Fi module170, a processor comprising one or more than one processing core, apower supply 190 and the like. Those skilled in the art may understandthat the computing device structure shown in the figure. does not definethe computing device; the computing device may comprise parts more orfewer than that shown in the figure, or comprise combinations of someparts, or different part arrangements. The communication unit 110 may beconfigured to receive and send signals during a process of informationexchange or talking. The communication unit 110 may be such networkcommunication equipment as an RF (Radio Frequency, radio frequency)circuit, a router, a modem and the like. Specially, when thecommunication unit 110 is an RF circuit, the RF circuit after receivesdownlink information from a base station, sends the information over toone or more processors 180 for processing. Moreover, the RF circuitsends uplink data to the base station. Usually, the RF circuit servingas the communication unit comprises, but is not limited to an antenna,at least one amplifier, a tuner, one or more oscillators, a subscriberidentity module (SIM) card, a transceiver, a couple, an LNA (Low NoiseAmplifier, low noise amplifier), a duplexer and the like. In addition,the communication unit 110 may further be communicated with the networkor other devices through radio communications. Any of communicationstandard or protocol may be used for radio communication, whichcomprises, but not limited to GSM (Global System of Mobilecommunication, global system of mobile communication), GPRS (GeneralPacket Radio Service, general packet radio service), CDMA (Code DivisionMultiple Access, code division multiple address), WCDMA (Wideband CodeDivision Multiple Access, wideband code division multiple address), LTE(Long Term Evolution, long term evolution), an email, SMS (ShortMessaging Service, short messaging service) and the like. The memory 120may be configured to store software programs and modules. The processor180 carries out various function applications and data processingthrough the software programs and modules stored in the memory 120. Thememory 120 may mainly comprise a program storage area and a data storagearea, wherein the program storage area may store the applications (suchas sound playing function, image playing function and the like) requiredby an operating system, at least one function and the like. The datastorage area may store the data (such as audio data, telephone directoryand the like) created according to the use of the computing device 800,and the like. In addition, the memory 120 may comprises a high speedrandom access memory, and may further comprises a non-volatile memory,for example, at least one disk memory device, a flash memory device orother volatile solid state memory devices. Accordingly, the memory 120may further comprise a memory controller so as to provide access of theprocessor 180 and the input unit 130 to the memory 120. The input unit130 may be configured to receive inputted number or characterinformation, and produce keyboard, mouse, joystick, optical or trackballsignal input related to user settings and function control. Preferably,the input unit 130 may comprise a touch-sensitive surface 131 and otherinput devices 132. The touch-sensitive surface 131 is also called atouch display screen or a touchpad, which may collect a touch operationof the user on or near the touch-sensitive surface (for example,operation of the user on the touch-sensitive surface 131 or near thetouch-sensitive surface 131 by using any proper object or accessory likefingers, stylus and the like), and drive a corresponding connectingdevice according to a preset program. In some embodiments, thetouch-sensitive surface 131 may comprise two parts which include a touchdetecting device and a touch controller. The touch detecting devicedetects a touch position and direction of the user and a signal broughtby the touch operation, and transmits the signal to the touchcontroller. The touch controller receives touch information from thetouch detecting device, and converts the touch information into contactcoordinates, and then transmits the contact coordinates to the processor180. Moreover, the touch controller can receive and carry out aninstruction sent by the processor 180. Furthermore, the touch-sensitivesurface 131 may be implemented in various types such as resistor type,capacitance type, infrared rays, surface acoustic waves and the like.Except the touch-sensitive surface, the input unit 130 may furthercomprise other input devices 132. Preferably, the other input devices132 may comprise, but not limited to one or more of a physical keyboard,virtual (function) keys (such as volume control keys, switch keys etc.),trackballs, mouse, joysticks and the like. The display unit 140 may beconfigured to display the information provided by the user or theinformation provided to the user as well as various graphical userinterfaces of the computing device 500, wherein the graphical userinterfaces may be composed of graphs, texts, icons, videos and anycombination thereof. The display unit 140 may comprise a display panel141. In some embodiments, the display panel 141 may be configured byadopting such forms as LCD (Liquid Crystal Display, liquid crystaldisplay), OLED (Organic Light-Emitting Diode, organic light emittingdiode) and the like. Further, the touch-sensitive surface 131 may coverthe display panel 141. When the touch-sensitive surface 131 detects thetouch operation on or near the touch-sensitive surface, thetouch-sensitive surface 131 transmits the touch operation to theprocessor 180 so as to determine the type of a touch event. Afterwards,the processor 180 provides corresponding visual output on the displaypanel 141 according to the type of the touch event. Although in FIG. 4,the touch-sensitive surface 131 and the display panel 141 are served astwo independent parts to realize input and output functions, in someembodiments, the touch-sensitive surface 131 and the display panel 141may be integrated to realize the input and output functions.

The computing device 500 may further comprise at least a sensor 150, forexample, a light sensor, a motion sensor and other sensors. The lightsensor may comprise an ambient light sensor and a proximity sensor,wherein the ambient light sensor may adjust the brightness of thedisplay panel 141 according to the lighting of the ambient light, andthe proximity sensor may close the display panel 141 and/or backlightwhen the computing device 500 approaches the ear. As one type of motionsensors, a gravity acceleration sensor may detect the acceleration ineach direction (usually in three axial directions), may detect the valueand direction of the gravity in a static state, may be used for anapplication used for recognizing a mobile phone gesture (such asswitching between a horizontal screen and a vertical screen, switchingrelated to a game, and calibration on the posture of a magnetometer),vibration identifying functions (such as for pedometer and striking) andthe like, in the touch screen computing device. Furthermore, agyroscope, a barometer, a humidity meter, a thermometer, an infraredsensor and other sensors may be integrated into the touch screencomputing device 500, to which explanation are not repeated herein.

The audio circuit 160, a loud speaker 161 and a microphone 162 mayprovide an audio interface between the user and the computing device500. The audio circuit 160 may transmit an electric signal convertedfrom the received audio data to the loud speaker 161, and the loudspeaker 161 converts the electric signal into a sound signal andoutputs. On the other hand, the microphone 162 converts the collectedsound signal into an electric signal. The audio circuit 160 receives theelectric signal and converts the electric signal into audio data, andthen outputs the audio data to the processor 180 to be processed so asto send the audio data to, for example, another computing device throughthe RF circuit 110 or output the audio data to the memory 120 forfurther processing. The audio circuit 160 may further possibly comprisean ear plug jack so as to provide communication between a peripheralearphone and the computing device 500. In order to realize radiocommunication, a radio communication unit 170 may be configured on thecomputing device, wherein the radio communication unit 170 may be a WIFImodule. WIFI belongs to a short distance radio transmission technology.The computing device 500 may help the user receive and send an Email,browse web pages and access streaming media and the like through theradio communication unit 170. The radio communication unit providesradio wideband internet access for the user. Although the radiocommunication unit 170 is shown in the figure, it is understandable thatthe radio communication unit does not belong to a required component ofthe computing device 500, and may be completely omitted as requiredwithout changing the scope of the present application.

The processor 180 is the control center of the computing device 500,which utilizes various interfaces and lines to connect with each part ofthe entire mobile phone, and carries out various functions of thecomputing device 800, and processes data through operating or carryingout the software program and/or module stored in the memory 120 andcalling in the data stored in the memory 120, thus performing entiremonitoring on the mobile phone. In some embodiments, the processor 180may comprise one or more processing cores. Preferably, the processor 180may integrate an application processor and a modulation-demodulationprocessor, wherein the application processor is mainly used for theoperating system, the user interface and applications and the like, andthe modulation-demodulation processor is mainly used for radiocommunication. It is understandable that the foregoingmodulation-demodulation processor may also not be integrated into theprocessor 180.

The computing device 800 further comprises a power supply 190 (such as abattery) that supplies power to each part. Preferably, the power supplymay be logically connected with the processor 180 through a power supplymanagement system, thus realizing to management of power charging, powerdischarging and power consumption and the like through the power supplymanagement system. The power supply 190 may further comprise anycomponent such as one or more direct current or alternating currentpower supplies, a recharging system, a power failure detection circuit,a power supply convertor or inverter, a power supply status indicatorand the like.

In the embodiment, the computing device 500 further comprises a memoryand one or more program modules as described above in connection withFIG. 4, wherein one or more program modules is stored in the memory 120,and one or more processors are configured to carry out an instructionincluded in one or more program modules for performing the methodaccording to the embodiment of the present application, comprisingreceiving an instant message, the instant message having an associatedpicture and including address information of the picture; determiningwhether the computing device is in a first network environment or not;when the computing device is in the first network environment:displaying a thumbnail of the picture on the screen and a visual cueindicating that the picture is being downloaded; downloading the pictureassociated with the instant message according to the address informationwithout receiving a download instruction from a user of the computingdevice; and replacing the thumbnail with the picture after the pictureis downloaded.

It should be noted that examples are provided for description based ondividing of the foregoing functional modules when the apparatus providedby the foregoing embodiments displays the pictures. In actualapplication, the foregoing functions may be assigned to differentfunctional modules for completion as required. That is, an internalstructure of the terminal is divided into different functional modulesto complete all or a part of the functions described in the foregoing.Furthermore, the apparatus provided by the foregoing embodiments is ofthe same concept with an embodiment of the picture displaying method,and the detailed information can be found in the description of theembodiments of the method, and will not be described herein.

Those skilled in the art may appreciate that all or some steps of theabove embodiments may be implemented in hardware, or may be implementedby the related hardware instructed by a program, the program may bestored in a computer readable storage medium, which may be a read-onlymemory, a magnetic disk, or an optical disk, etc. The above descriptionis merely some preferred embodiments of the present application, and isnot used to limit the present application. Any modifications, equivalentalternatives, and improvements within the spirit and principle of thepresent application shall be included in the protection scope of thepresent application.

While particular embodiments are described above, it will be understoodit is not intended to limit the invention to these particularembodiments. On the contrary, the invention includes alternatives,modifications and equivalents that are within the spirit and scope ofthe appended claims. Numerous specific details are set forth in order toprovide a thorough understanding of the subject matter presented herein.But it will be apparent to one of ordinary skill in the art that thesubject matter may be practiced without these specific details. In otherinstances, well-known methods, procedures, components, and circuits havenot been described in detail so as not to unnecessarily obscure aspectsof the embodiments.

Although the terms first, second, etc. may be used herein to describevarious elements, these elements should not be limited by these terms.These terms are only used to distinguish one element from another. Forexample, first ranking criteria could be termed second ranking criteria,and, similarly, second ranking criteria could be termed first rankingcriteria, without departing from the scope of the present application.First ranking criteria and second ranking criteria are both rankingcriteria, but they are not the same ranking criteria.

The terminology used in the description of the invention herein is forthe purpose of describing particular embodiments only and is notintended to be limiting of the invention. As used in the description ofthe invention and the appended claims, the singular forms “a,” “an,” and“the” are intended to include the plural forms as well, unless thecontext clearly indicates otherwise. It will also be understood that theterm “and/or” as used herein refers to and encompasses any and allpossible combinations of one or more of the associated listed items. Itwill be further understood that the terms “includes,” “including,”“comprises,” and/or “comprising,” when used in this specification,specify the presence of stated features, operations, elements, and/orcomponents, but do not preclude the presence or addition of one or moreother features, operations, elements, components, and/or groups thereof.

As used herein, the term “if” may be construed to mean “when” or “upon”or “in response to determining” or “in accordance with a determination”or “in response to detecting,” that a stated condition precedent istrue, depending on the context. Similarly, the phrase “if it isdetermined [that a stated condition precedent is true]” or “if [a statedcondition precedent is true]” or “when [a stated condition precedent istrue]” may be construed to mean “upon determining” or “in response todetermining” or “in accordance with a determination” or “upon detecting”or “in response to detecting” that the stated condition precedent istrue, depending on the context.

Although some of the various drawings illustrate a number of logicalstages in a particular order, stages that are not order dependent may bereordered and other stages may be combined or broken out. While somereordering or other groupings are specifically mentioned, others will beobvious to those of ordinary skill in the art and so do not present anexhaustive list of alternatives. Moreover, it should be recognized thatthe stages could be implemented in hardware, firmware, software or anycombination thereof.

The foregoing description, for purpose of explanation, has beendescribed with reference to specific implementations. However, theillustrative discussions above are not intended to be exhaustive or tolimit the invention to the precise forms disclosed. Many modificationsand variations are possible in view of the above teachings. Theimplementations were chosen and described in order to best explainprinciples of the invention and its practical applications, to therebyenable others skilled in the art to best utilize the invention andvarious implementations with various modifications as are suited to theparticular use contemplated. Implementations include alternatives,modifications and equivalents that are within the spirit and scope ofthe appended claims. Numerous specific details are set forth in order toprovide a thorough understanding of the subject matter presented herein.But it will be apparent to one of ordinary skill in the art that thesubject matter may be practiced without these specific details. In otherinstances, well-known methods, procedures, components, and circuits havenot been described in detail so as not to unnecessarily obscure aspectsof the implementations.

What is claimed is:
 1. A computer-implemented method of downloading anddisplaying pictures associated with instant messages on a screen of acomputing device, the method comprising: at the computing device havingone or more processors and memory for storing program modules to beexecuted by the processors: displaying a list of instant messages on thescreen, at least one of the instant messages having an associatedpicture and including address information of the picture; while thepicture is being downloaded: detecting a user instruction to slide thelist of instant messages on the screen; in response to the userinstruction: pausing the download of the picture; determining, among thelist of instant messages, a second instant message having an associatedsecond picture and including address information of the second picturebased on the user instruction; and downloading the second pictureassociated with the second instant message according to the addressinformation without receiving a download instruction from the user ofthe computing device.
 2. The method of claim 1, further comprising:while the picture is being downloaded: displaying a thumbnail of thepicture on the screen and a first visual cue indicating that the pictureis being downloaded prior to detecting the user instruction; andreplacing the thumbnail with the picture after the picture isdownloaded.
 3. The method of claim 2, wherein the picture is beingdownloaded when the computing device has a Wi-Fi connection, the methodfurther comprising: detecting an interruption to the Wi-Fi connection;pausing the download of the picture in response to the interruption tothe Wi-Fi connection; and replacing the visual cue with a second visualcue indicating that the download of the picture is paused.
 4. The methodof claim 3, further comprising: resuming the download of the pictureafter receiving a download instruction from the user of the computingdevice; and replacing the thumbnail with the picture after the pictureis downloaded.
 5. The method of claim 1, wherein the download of thepicture is paused when the corresponding instant message is going todisappear from the screen according to the user instruction to slide thelist of instant messages on the screen.
 6. The method of claim 1,wherein the second instant message is not displayed on the screen beforethe user instruction to slide the list of instant messages on thescreen.
 7. The method of claim 6, wherein the download of the secondpicture is started before the second instant message appears on thescreen.
 8. The method of claim 1, further comprising: receiving multipleinstant messages, each having an associated picture and includingaddress information of the picture; displaying a thumbnail of eachpicture on the screen and a visual cue indicating that the picture isbeing downloaded; and downloading the pictures associated with theinstant messages according to the respective address information withoutreceiving any download instruction from the user of the computingdevice.
 9. The method of claim 8, wherein the pictures are downloaded ina chronological order of the respective messages' receiving time. 10.The method of claim 8, wherein the pictures are downloaded in a reversechronological order of the respective messages' receiving time.
 11. Themethod of claim 8, wherein the pictures are downloaded in an orderaccording to the respective pictures' sizes wherein a picture of asmaller size is downloaded before a picture of a larger size.
 12. Acomputing device comprising: one or more processors; memory; a screen;and a plurality of instructions stored in the memory, wherein theplurality of instructions, when executed by the one or more processors,cause the computing device to perform the following operations:displaying a list of instant messages on the screen, at least one of theinstant messages having an associated picture and including addressinformation of the picture; while the picture is being downloaded:detecting a user instruction to slide the list of instant messages onthe screen; in response to the user instruction: pausing the download ofthe picture; determining, among the list of instant messages, a secondinstant message having an associated second picture and includingaddress information of the second picture based on the user instruction;and downloading the second picture associated with the second instantmessage according to the address information without receiving adownload instruction from the user of the computing device.
 13. Thecomputing device of claim 12, wherein the computing device is furtherconfigured to perform the following operations: while the picture isbeing downloaded: displaying a thumbnail of the picture on the screenand a first visual cue indicating that the picture is being downloadedprior to detecting the user instruction; and replacing the thumbnailwith the picture after the picture is downloaded.
 14. The computingdevice of claim 13, wherein the picture is being downloaded when thecomputing device has a Wi-Fi connection, and the computing device isfurther configured to perform the following operations: detecting aninterruption to the Wi-Fi connection; pausing the download of thepicture in response to the interruption to the Wi-Fi connection; andreplacing the visual cue with a second visual cue indicating that thedownload of the picture is paused.
 15. The computing device of claim 14,wherein the computing device is further configured to perform thefollowing operations: resuming the download of the picture afterreceiving a download instruction from the user of the computing device;and replacing the thumbnail with the picture after the picture isdownloaded.
 16. The computing device of claim 12, wherein the downloadof the picture is paused when the corresponding instant message is goingto disappear from the screen according to the user instruction to slidethe list of instant messages on the screen.
 17. The computing device ofclaim 12, wherein the second instant message is not displayed on thescreen before the user instruction to slide the list of instant messageson the screen.
 18. The computing device of claim 17, wherein thedownload of the second picture is started before the second instantmessage appears on the screen.
 19. A non-transitory computer readablemedium storing one or more programs, wherein the one or more programs,when executed by a computing device having one or more processors, causethe computing device to perform the following operations: displaying alist of instant messages on the screen, at least one of the instantmessages having an associated picture and including address informationof the picture; while the picture is being downloaded: detecting a userinstruction to slide the list of instant messages on the screen; inresponse to the user instruction: pausing the download of the picture;determining, among the list of instant messages, a second instantmessage having an associated second picture and including addressinformation of the second picture based on the user instruction; anddownloading the second picture associated with the second instantmessage according to the address information without receiving adownload instruction from the user of the computing device.
 20. Thenon-transitory computer readable medium of claim 19, wherein thedownload of the picture is paused when the corresponding instant messageis going to disappear from the screen according to the user instructionto slide the list of instant messages on the screen.